import { request } from "@/utils/service"
import { getToken } from "@/utils/cache/cookies"
import axios from "axios"
const baseURL = import.meta.env.VITE_BASE_API
// 查
export function getOrderLsApi(params: any) {
  return request({
    url: "/orderHistory/query",
    method: "get",
    params
  })
}
// 修改
export function updateOrderLsApi(data: any) {
  return request({
    url: "/orderHistory/update",
    method: "put",
    data
  })
}
// 下载
export function downLoadOrderTable(data: any) {
  return axios({
    url: `${baseURL}/orderHistory/downOrder`,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data,
    responseType: "blob"
  })
}
//  获取订单状态code
export function getOrdeCode() {
  return request({
    url: "order/getAllState",
    method: "get"
  })
}
